import treasureCtr from "./treasureCtr";
import treasureTp from "./treasureTp";

/**
 * @Author: 陈瑞鹏
 * @Date:   2022-12-14 09:49:09
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-12-14 14:19:17
 */
export default class treasureEntity {
  public uid: string; //唯一id
  public treasureId: number; //宝箱模板id
  public step: number = 1; //宝箱开启进度 开启步骤 1未开启 2 开启中 3开启完成可以点击获取奖励 4 宝箱已经被领取
  public treasureT: treasureTp = null; //宝箱模板 
  public openTime: number; //宝箱开启时间  时间戳
  public init(val) {
    this.uid = val._id;
    this.treasureId = val.treasureId;
    this.step = val.step;
    this.treasureT = treasureCtr.ins.getTreasureTpById(this.treasureId);
    this.openTime = val.openTime;
  }
}